package com.atguigu.guli.service.base.exception;

import com.atguigu.guli.service.base.result.ResultCodeEnum;
import lombok.Data;

@Data
public class GuliException extends RuntimeException {
    private ResultCodeEnum codeEnum;
    private Exception e;
    public GuliException(ResultCodeEnum codeEnum){
        super(codeEnum.getMessage());
        this.codeEnum =codeEnum;
    }
    public GuliException(Exception e,ResultCodeEnum codeEnum){
        super(e.getMessage());
        this.codeEnum =codeEnum;
        this.e =e;
    }
}
